/**
 * DrawElementVisual.java
 * @authors: Connor Gordon, Difan Zhao, Kathleen Lan, Patrick Royal
 */

package view.visualizer;

import java.util.List;
import javax.swing.JComponent;
import model.Element;


/**
 * Interface for Drawers of various visualization types.
 * 
 * @author Kathleen Lan
 * 
 */
public abstract class ElementVisualDrawer extends JComponent {
    private static final long serialVersionUID = 1L;

    /**
     * Check which element was clicked.
     * @param x x-coordinate of click
     * @param y y-coordinate of click
     */
    public abstract String clickedElementVisualCheck (int x, int y);

    /**
     * Creates an Element with radius r centered at (x,y).
     * 
     * @param x x position of the Bubble to be created
     * @param y y position of the Bubble to be created
     * @param w width of the object
     * @param h height of the object
     * @param name label for Element associated with (or represented by) the
     *        Bubble
     * @param label label for Element associated with bubble
     */
    public abstract void makeElementVisual (int x, int y, int w, int h,
            String name, String label);

    /**
     * Iterates through elementList and makes a new Bubble for each Element.
     * @param myElements data through which to iterate
     */
    public abstract void createVisualization (List<Element> myElements);

    /**
     * Drawer is informed of the JPanel's dimensions and stores the
     * values.
     * 
     * @param w width of canvas
     * @param h height of canvas
     */
    public abstract void setCanvasSize (int w, int h);
}
